package cn.da.shuai.cool.finance.model;

import cn.da.shuai.cool.common.entity.EntityBase;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDate;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("cool_accounts_receivable")
public class CoolAccountsReceivable extends EntityBase {

    @TableField("customer_id")
    private Long customerId;

    @TableField("customer_name")
    private String customerName;

    @TableField("invoice_no")
    private String invoiceNo;

    @TableField("invoice_date")
    private LocalDate invoiceDate;

    @TableField("due_date")
    private LocalDate dueDate;

    @TableField("amount")
    private BigDecimal amount;

    @TableField("paid_amount")
    private BigDecimal paidAmount;

    @TableField("remaining_amount")
    private BigDecimal remainingAmount;

    @TableField("status")
    private String status; // PENDING, PARTIALLY_PAID, PAID, OVERDUE

    @TableField("payment_terms")
    private String paymentTerms;

    @TableField("currency")
    private String currency;

    @TableField("exchange_rate")
    private BigDecimal exchangeRate;

    @TableField("description")
    private String description;
}